﻿@model IEnumerable<CloudFranceTriple.Models.GameGroupSet>

@{
    ViewBag.Title = CloudFranceTriple.WebRole.Properties.Resources.GameIndexTitle;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="content-padding">
    <h1>@CloudFranceTriple.WebRole.Properties.Resources.GameIndexTitle
        @if (User.IsInRole("RoleAdminGame"))
        {
            <span>- </span><a href="/gaming/publisher">@CloudFranceTriple.WebRole.Properties.Resources.MenuPublisher</a>
            <span>- </span><a href="/gaming/gamegroup">@CloudFranceTriple.WebRole.Properties.Resources.MenuGameGroup</a>
        }
    </h1>
    <p></p>
    <section>
        @if (User.IsInRole("RoleAdminGame"))
        {
            <p>
                @Html.ActionLink(@CloudFranceTriple.WebRole.Properties.Resources.GameAddButton, "Create", "Game", new { area = "Gaming" }, null)
            </p>
        }
        @foreach (var item in Model)
        {
            <table style="width: 100%; border: 1px solid #fffffe; margin-bottom: 10px;">
                <tr>
                    <td colspan="2" class="center">
                        <h3 style="background-color: #333333; border-radius: 8px;">@item.Label</h3>
                    </td>
                </tr>
                @Html.Action("ShowGame", "Game", new { area = "Gaming", Id = @item.Id })
            </table>
        }
    </section>
    @if (User.IsInRole("RoleAdminGame"))
    {
        <p>
            @Html.ActionLink(@CloudFranceTriple.WebRole.Properties.Resources.GameAddButton, "Create", "Game", new { area = "Gaming" }, null)
        </p>
    }
    <h1>@CloudFranceTriple.WebRole.Properties.Resources.GameIndexTitle
        @if (User.IsInRole("RoleAdminGame"))
        {
            <span>- </span><a href="/gaming/publisher">@CloudFranceTriple.WebRole.Properties.Resources.MenuPublisher</a>
            <span>- </span><a href="/gaming/gamegroup">@CloudFranceTriple.WebRole.Properties.Resources.MenuGameGroup</a>
        }
    </h1>
    <br />
</div>
